#!/usr/bin/python
dict1 = {'golang':'this is golang','java':'this is java','c++':'this is c++'}
for key in dict1:
    print(key,dict1[key])
dict1['java'] = 'as java'
print(dict1)
print('------------')
print(dict1['golang'])
dict1['golang'] = 'is go'
print(dict1['golang'])
#del dict1['golang']
print(dict1)
print('------------')
print(len(dict1))
print(str(dict1))
print('------字典的常用方法------')
item = dict1.items()
keys = dict1.keys()
values = dict1.values()
if 'go1' in dict1:
    print(dict1['go1'])
else:
    print("none")



